1 <?php
2     include_once
'header.php';
3 ?>
4 <html>
5     <head>
6         <title>Show</title>
7                 <link rel=
"stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
8
9                 <!-- Optional theme -->
10                 <link rel=
"stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
11
12                 <!-- Latest compiled and minified JavaScript -->
13                 <script src=
"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
14                 <meta name=
"viewport" content="width=device-width, initial-scale=1">
15     </head>
16
17
18         <style>
19         table,th,td
20         {
21             border: 2px solid black;
22             font-family: monospace;
23             font-size:
150%;
24             padding:
0.25cm;
25
26         }
27         body{
28                 background-image: url(
"images/show.jpg");
29                 -moz-background-size: cover;
30                 -webkit-background-size: cover;
31                  background-size:
100% 110vh;
32                 background-position: top center !important;
33                 background-repeat: no-repeat !important;
34                 background-attachment:
fixed;
35             
36             }
37         button
38         {
39             display: block;
40             margin:
0 auto;
41             width:
10%;
42             height: 40px;
43             border: none;
44             background-color: #
222;
45             font-family: arial;
46             font-size: 16px;
47             color: #fff;
48             cursor: pointer;
49         }
50     </style>
51
52     <body style=
"background-color: powderblue; font-family: monospace; margin: 0; padding: 0;">
53         <h1 align=
"middle" style="font-size: 300%; color:white;"><b>Now Showing</b></h1>
54         <h1 align=
"middle" style="font-size: 250%; color:white;"><br><b><?php echo $_SESSION['mov_name']; ?></b></h1>
55
56         <?php
57
58             $dbServername =
"localhost";
59             $dbUsername =
"root";
60             $dbPassword =
"password";
61             $dbName =
"test";
62
63             $conn = mysqli_connect($dbServername, $dbUsername, $dbPassword, $dbName);
64             $sql2=
"SELECT t_name,time,location,show_id,s.seats from theater t,shows s,movie m where m.mov_name='".$_SESSION['mov_name']."' and t.t_id=s.t_id and s.mov_id=m.mov_id;";
65             mysqli_query($conn, $sql2) or die(
'Error');
66             $result2 = mysqli_query($conn, $sql2);
67             echo
'<br><br><table style="margin-left: 20%; margin-right: 20%; background-color:black; color:white;">
68                     <tr>
69                         <td align=
"middle"><u><b>Show ID</b></u></td>
70                         <td align=
"middle"><u><b>Theater</b></u></td>
71                         <td align=
"middle"><u><b>Location</b></u></td>
72                         <td align=
"middle"><u><b>Date & Time</b></u></td>
73                         <td align=
"middle"><u><b>Remaining Seats</b></u></td>
74                     </tr>
';
75             
while($row=mysqli_fetch_array($result2))
76             {
77                 echo
'<tr>
78                             <td align=
"middle">'.$row['show_id'].'</td>
79                             <td align=
"middle">'.$row['t_name'].'</td>
80                             <td align=
"middle">'.$row['location'].'</td>
81                             <td >
'.$row['time'].'</td>
82                             <td align=
"middle">'.$row['seats'].'</td>
83
84                       </tr>
';
85             }
86
87             echo
'</table><br><br><br>';
88         
89
90
91
92             $sql3=
"SELECT show_id from theater t,shows s,movie m where m.mov_name='".$_SESSION['mov_name']."' and t.t_id=s.t_id and s.mov_id=m.mov_id;";
93             mysqli_query($conn, $sql3) or die(
'Error');
94             $result3 = mysqli_query($conn, $sql3);
95             $option =
'';
96             
while($row = mysqli_fetch_assoc($result3))
97             {
98               $option .=
'<option value ='.$row['show_id'].'>'.$row['show_id'].'</option>';
99             }
100
101         ?>
102     
103
104             
105             <form align=
"middle" action="includes/booking.php" method="POST">
106                     <div
class="form-group">
107                         <
select style=" width:200px; margin-left: 42%;" class="form-control" id="show" name="show">
108                              <option selected disabled><b>Select Show Id</b></option>
109                              <?php echo $option; ?>
110                         </
select><br><br>
111                         <input style=
" width:200px; margin-left: 42%;" type="number" name="seats" placeholder="No of Seats" class="form-control"><br><br>
112                         <button style=
"border:1px solid black; font-family:monospace; color:black; font-style:bold; font-size:20px;" type="submit" class="btn btn-success" name="submit"> Confirm <span class="glyphicon glyphicon-ok"></span></button>
113                     </div>
114             </form>
115
116     </body>
117 </html>
118 <?php
119     include_once
'footer.php';
120 ?>


Gõ tìm kiếm nhanh...